package rest.jbpm;

import com.sun.jersey.spi.resource.Singleton;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import org.jbpm.api.Configuration;
import org.jbpm.api.ProcessEngine;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


@Path("/")
@Singleton
public class JbpmService { 
	
	public static ProcessEngine processEngine = new Configuration().buildProcessEngine();
	private static Logger log = LoggerFactory.getLogger(JbpmService.class);
	private static JbpmService instance = new JbpmService();
    
    public JbpmService() {
        
    }
    
    public static JbpmService instance() {
        return instance;
    }
    
	@GET
	@Path("hello")
	@Produces("text/*")
	public static String hello() {
		return "I'm alive!";
	}

}